#include "Global.h"

#define DBGOUT_ENABLE

#if 0
void SetupDebugPort(void)
{
	Uart_Init( 0,115200 );
}
void DbgOut(char *fmt,...)
{
    va_list ap;
    char string[256];

#ifdef DBGOUT_ENABLE
    va_start(ap,fmt);
    vsprintf(string,fmt,ap);
    Uart_SendString(string);
    va_end(ap);
#endif	
}

#else
void SetupDebugPort(void)
{
	UART0ModSetup(115200 );
}
void DbgOut(char *fmt,...)
{
    va_list ap;
    uint len;
    char string[256];

#ifdef DBGOUT_ENABLE
    va_start(ap,fmt);
    len=vsprintf(string,fmt,ap);
    //Uart_SendString(string);
    UART0_SendData((byte*)string,len);
    va_end(ap);
#endif	
}
#endif


